<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>z-index</title>
		<style>
			div {
				width: 200px;
				height: 200px;
			}
			/* z-index，只对设置了postion的元素生效 */
			.div1 {
				background-color: red;
				position: absolute;
				top: 0px;
				left: 0px;
				z-index: 1;
			}
			.div2 {
				background-color: green;
				position: absolute;
				z-index: 0;
			}
			.div3 {
				background-color: blue;
				margin-left: 50px;
				margin-top: 50px;
			}
		</style>
	</head>
	<body>
		<!-- 文档流上1层 -->
		<div class="div1"></div>
		<!-- 文档流上2层 -->
		<div class="div2"></div>
		<!-- 标准文档流，最下层 -->
		<div class="div3"></div>
	</body>
</html>